TestValidationResult<T>
Assembly: ServiceStack.dll
View Source
Declaration
public class TestValidationResult<T> : ValidationResult where T : class
Inherited Properties
Errors
A collection of errors
View Source
Declaration
public IList<ValidationFailure> Errors { get; }
IsValid
Whether validation succeeded
View Source
Declaration
public virtual bool IsValid { get; }
Request
View Source
Declaration
public IRequest Request { get; set; }
RuleSetsExecuted
View Source
Declaration
public string[] RuleSetsExecuted { get; }
Methods
ShouldHaveValidationErrorFor<TProperty>(Expression<Func<T, TProperty>>)
View Source
Declaration
public IEnumerable<ValidationFailure> ShouldHaveValidationErrorFor<TProperty>(Expression<Func<T, TProperty>> memberAccessor)
Returns
System.Collections.Generic.IEnumerable<ServiceStack.FluentValidation.Results.ValidationFailure>
Parameters
Type | Name |
---|---|
System.Linq.Expressions.Expression<System.Func<<T>,<TProperty>>> | memberAccessor |
Type Parameters
TProperty
ShouldNotHaveValidationErrorFor<TProperty>(Expression<Func<T, TProperty>>)
View Source
Declaration
public void ShouldNotHaveValidationErrorFor<TProperty>(Expression<Func<T, TProperty>> memberAccessor)
Parameters
Type | Name |
---|---|
System.Linq.Expressions.Expression<System.Func<<T>,<TProperty>>> | memberAccessor |
Type Parameters
TProperty
ShouldHaveValidationErrorFor(String)
View Source
Declaration
public IEnumerable<ValidationFailure> ShouldHaveValidationErrorFor(string propertyName)
Returns
System.Collections.Generic.IEnumerable<ServiceStack.FluentValidation.Results.ValidationFailure>
Parameters
Type | Name |
---|---|
System.String | propertyName |
ShouldNotHaveValidationErrorFor(String)
View Source
Declaration
public void ShouldNotHaveValidationErrorFor(string propertyName)
Parameters
Type | Name |
---|---|
System.String | propertyName |
Inherited Methods
ToString()
Generates a string representation of the error messages separated by new lines.
View Source
Declaration
public override string ToString()
Returns
System.String
ToString(String)
Generates a string representation of the error messages separated by the specified character.
View Source
Declaration
public string ToString(string separator)
Returns
System.String
Parameters
Type | Name | Description |
---|---|---|
System.String | separator | The character to separate the error messages. |
|